package main

import (
	"fmt"
	"time"
)

func main() {
	var d1 Employee
	var d2 Employee
	fmt.Println(d1, d1 == d2)

	// 比较
	p := Point{1, 2}
	q := Point{1, 2}
	fmt.Println(p.X == q.X && p.Y == q.Y) // "true"
	fmt.Println(p == q)                   // "true"

	// 嵌套
	var w1 Wheel = Wheel{
		Circle{
			Point{1, 2},
			3,
		},
		"4",
	}
	var w2 Wheel = Wheel{
		Circle{
			Point{1, 2},
			3,
		},
		"4",
	}
	fmt.Println("嵌套", w1 == w2)
}

type Employee struct {
	ID        int
	Name      string
	Address   string
	DoB       time.Time
	Position  string
	Salary    int
	ManagerID int
}

type Point struct{ X, Y int }

type Circle struct {
	Point
	Radius int
}

type Wheel struct {
	Circle
	Spokes string
}
